package cn.com.cloudpioneer.evaluate.mapper;

import cn.com.cloudpioneer.evaluate.model.TaskModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @auther maruikai
 * @create 2023/9/13-17:49
 */
public interface TaskMapper {

    Integer addTask(TaskModel taskModel);

    TaskModel findById(@Param("taskId") String taskId);

    List<TaskModel> findByItemIn(@Param("itemId") String itemId);

    List<TaskModel> findChildByItemId(@Param("itemId") String itemId);

    List<TaskModel> findParentByItemId(@Param("itemId") String itemId);

    List<TaskModel> findByParentIt(@Param("parentId") String parentId);

    Integer setFilePath(@Param("taskId") String taskId, @Param("filePath") String filePath);

    Integer update(TaskModel taskModel);

    Integer delTask(@Param("deleteFlag")Boolean deleteFlag,@Param("taskId") String taskId);

    Integer updateScore(@Param("score") int score, @Param("taskId") String taskId);

    Integer updateFilePath(@RequestParam("filePath") String filePath,@Param("taskId") String taskId);
}
